﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for CustomerBAL
/// </summary>
public class CustomerBAL
{
	private CustomersDAL _customerDal;
    
    public CustomerBAL() : this(new CustomersDAL()) { }
    public CustomerBAL(CustomersDAL customerDal) { _customerDal = customerDal; }


    public int InsertCutomer(CustomersBO Customer)
    {

        try
        {
           
            return _customerDal.CreateCustomers(Customer);



        }
        catch (Exception ex)
        {
            throw ex;


        }
        finally
        {

            _customerDal = null;

        }
    }
    public DataTable AddressFillDropDown()
    {

       
        try
        {

            return _customerDal.AddressFillDropDown();

        }

        catch
        {

            throw;

        }

        finally
        {

            _customerDal = null;

        }

    }
    public DataTable AccountFillDropDown()
    {

       
        try
        {

            return _customerDal.AccountFillDropDown();

        }

        catch
        {

            throw;

        }

        finally
        {

            _customerDal = null;

        }

    }
    public int UpdateCustomer(CustomersBO Customer)
    {

        
        try
        {

            return _customerDal.UpdateCustomer(Customer);

        }

        catch
        {

            throw;

        }

        finally
        {

            _customerDal = null;

        }

    }
    public DataTable CustomerDisplay()
    {
        try
        {

            return _customerDal.Load();

        }

        catch
        {

            throw;

        }

        finally
        {

            _customerDal = null;

        }

    }
    public int DeleteCustomer(CustomersBO Customer)
    {


      
        try
        {

            return _customerDal.DeleteCustomer(Customer);

        }

        catch
        {

            throw;

        }

        finally
        {

            _customerDal = null;

        }

    }
    public int photo(CustomersBO Customer)
    {



        try
        {

            return _customerDal.CreateImage(Customer);

        }

        catch
        {

            throw;

        }

        finally
        {

            _customerDal = null;

        }

    }
    public string GetPic(CustomersBO Customer)
    {



        try
        {

            return _customerDal.GetImagePath(Customer);

        }

        catch
        {

            throw;

        }

        finally
        {

            _customerDal = null;

        }

    }
}